<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>编辑分类</title>
	<link rel="stylesheet" href="http://127.0.0.1/CMS/Application/Admin/View/Public/Css/public.css" />
	<link rel="stylesheet" href="http://127.0.0.1/CMS/Static/hdjs/hdjs.css" />
</head>
<body>
	<form action="<?php echo U('Category/edit');?>" method="post">
		<table class="hd-table hd-table-list">
		<?php foreach ($cateData as $k => $v): ?>
				<tr>
					<td align="right">ID：</td>
					<td><?php echo $v['cid'];?><input type="hidden" name="cid" value="<?php echo $v['cid'];?>"></td>
				</tr>	
				<tr>
					<td align="right">分类名称：</td>
					<td><input type="text" name="cname" value="<?php echo $v['cname'];?>"></td>
				</tr>
				<tr>
					<td align="right">摘要：</td>
					<td><textarea name="summary" id="" cols="80" rows="3"><?php echo $v['summary'];?></textarea></td>
				</tr>
				<tr>
					<td align="right">父级(id)分类：</td>
					<td>
						<select name="pid" id="">
							<option value="0">顶级分类</option>
							<?php foreach ($cateData_all as $key => $value): ?>
								<?php if ($value['pid']==$v['cid']) {
									echo '<option disabled="true" value="'.$varlue['cid'].'">'.$value['cname'].'</option>';
								}else{ ?>
								<option <?php if ($v['cid']==$value['cid']) {
									echo 'selected="true"';
								} ?> value="<?php echo $value['cid'];?>"><?php echo $value['cname'];?></option>
							<?php } endforeach ?>
						</select>
					</td>
				</tr>
				<tr>
					<td align="right">关键字：</td>
					<td><textarea name="keywords" id="" cols="80" rows="2"><?php echo $v['keywords'];?></textarea></td>
				</tr>
				<tr>
					<td align="right">排序:</td>
					<td><input type="text" name="sort" value="<?php echo $v['sort'];?>"></td>
				</tr>
				<tr>
					<td align="right">静态目录:</td>
					<td><input type="text" name="htmldir" value="<?php echo $v['htmldir'];?>"></td>
				</tr>
				<tr>
					<td align="right">是否显示:</td>
					<td> 
						<input <?php if($v['is_show']==1) echo 'checked=""' ?> type="radio" name="is_show" value="1">是
						<input <?php if($v['is_show']==0) echo 'checked=""' ?> type="radio" name="is_show" value="0">否
					</td>
				</tr>
			
				<tr>
					<td align="right">列表页是否生成静态:</td>
					<td> 
						<input <?php if($v['is_listhtml']==1) echo 'checked=""' ?> type="radio" name="is_listhtml" value="1">是
						<input <?php if($v['is_listhtml']==0) echo 'checked=""' ?> type="radio" name="is_listhtml" value="0">否
					</td>
				</tr>
				<tr>
					<td align="right">内容页是否生成静态:</td>
					<td>
						<input <?php if($v['is_archtml']==1) echo 'checked=""' ?> type="radio" name="is_archtml" value="1">是
						<input <?php if($v['is_archtml']==0) echo 'checked=""' ?> type="radio" name="is_archtml" value="0">否
					</td>
				</tr>
				<tr>
					
					<td colspan='2' align="center"><input type="submit" value="提交" class="hd-btn hd-btn-primary hd-btn-sm"></td>
				</tr>
			<?php endforeach ?>
		</table>
	</form>
</body>
</html>